package com.travel.service.impl;

/**
* @Title HotelDao.java
* @Package com.travel.dao
* @Author ChenGuanXi
* @Time 2020年10月28日 上午11:21:08
* @Version 1.0
* @Description: TODO
*/

import java.util.List;

import com.travel.dao.RoomTypeDao;
import com.travel.dao.impl.RoomTypeDaoImpl;
import com.travel.entity.RoomType;
import com.travel.service.RoomService;
import com.travel.service.RoomTypeService;

public class RoomTypeServiceImpl implements RoomTypeService {
	private RoomTypeDao roomTypeDao = new RoomTypeDaoImpl();

	@Override
	public boolean getInsertRoomType(RoomType roomType) {
		int i = roomTypeDao.insertRoomType(roomType);
		return i == 1 ? true : false;
	}

	@Override
	public boolean getDeleteRoomType(int roomTypeId) {
		int i = roomTypeDao.deleteRoomType(roomTypeId);
		return i == 1 ? true : false;
	}

	@Override
	public boolean getUpdateRoomtype(int roomTypeId, RoomType roomType) {
		int i = roomTypeDao.updateRoomtype(roomTypeId, roomType);
		return i == 1 ? true : false;
	}

	@Override
	public List<RoomType> queryAllRoomTypes() {
		List<RoomType> list = roomTypeDao.queryAllRoomTypes();
		return list;
	}

}
